<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>任务列表 - 教师测评系统</title>
    <!-- Bootstrap 5 CSS -->
    <link th:href="@{/static/css/bootstrap.min.css}" rel="stylesheet">
    <!-- Bootstrap Icons -->
    <link th:href="@{/static/css/bootstrap-icons.css}" rel="stylesheet">

    <style>
    :root {
      --primary-color: #3f6ad8;
      --primary-light: rgba(63, 106, 216, 0.1);
      --primary-dark: #2952bb;
      --primary-gradient: linear-gradient(135deg, #3f6ad8 0%, #2952bb 100%);
      --secondary-color: #6c757d;
      --success-color: #2dce89;
      --success-light: rgba(45, 206, 137, 0.1);
      --warning-color: #fb6340;
      --warning-light: rgba(251, 99, 64, 0.1);
      --danger-color: #f5365c;
      --light-color: #f8f9fe;
      --dark-color: #344767;
      --text-muted: #8a94a6;
      --border-radius: 16px;
      --card-shadow: 0 7px 25px rgba(0, 0, 0, 0.08);
      --hover-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }

    body {
      font-family: 'Noto Sans SC', 'Poppins', sans-serif;
      background-color: var(--light-color);
      background-image:
        radial-gradient(circle at 5% 10%, rgba(63, 106, 216, 0.05) 0%, transparent 15%),
        radial-gradient(circle at 95% 90%, rgba(63, 106, 216, 0.05) 0%, transparent 15%);
      padding-bottom: 80px; /* 为底部导航栏预留空间 */
      color: var(--dark-color);
      min-height: 100vh;
    }

    /* 导航栏 */
    .nav-bottom {
      position: fixed;
      bottom: 0;
      width: 100%;
      height: 66px;
      background-color: #fff;
      box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.07);
      display: flex;
      z-index: 1000;
      border-radius: 24px 24px 0 0;
      padding: 0 10px;
    }

    .nav-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      text-decoration: none;
      font-size: 12px;
      line-height: 1;
      transition: all 0.3s ease;
      position: relative;
      font-weight: 500;
      padding: 12px 0;
    }

    .nav-item.active {
      color: var(--primary-color);
    }

    .nav-item.active:after {
      content: '';
      position: absolute;
      bottom: 8px;
      width: 24px;
      height: 3px;
      background-color: var(--primary-color);
      border-radius: 3px;
    }

    .nav-icon {
      font-size: 24px;
      margin-bottom: 5px;
    }

    /* 页面容器 */
    .page-container {
      padding-top: 25px;
      padding-bottom: 30px;
      max-width: 540px;
      margin: 0 auto;
    }

    /* 卡片样式 */
    .card {
      border-radius: var(--border-radius);
      box-shadow: var(--card-shadow);
      margin-bottom: 24px;
      border: none;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
      overflow: hidden;
      background-color: #fff;
    }

    .card:hover {
      transform: translateY(-5px);
      box-shadow: var(--hover-shadow);
    }

    .card-body {
      padding: 24px;
    }

    /* 周期卡片 */
    .period-card {
      background: #fff;
      border-left: 4px solid var(--primary-color);
      position: relative;
      overflow: hidden;
    }

    .period-card::before {
      content: '';
      position: absolute;
      top: -10px;
      right: -10px;
      width: 100px;
      height: 100px;
      background: var(--primary-light);
      border-radius: 50%;
      opacity: 0.7;
      z-index: 0;
    }

    /* 图标圆圈 */
    .icon-circle {
      width: 46px;
      height: 46px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 16px;
      flex-shrink: 0;
    }

    .icon-circle-primary {
      background-color: var(--primary-light);
      color: var(--primary-color);
    }

    /* 空状态样式 */
    .empty-state {
      text-align: center;
      padding: 50px 0;
    }

    .empty-state-icon {
      font-size: 48px;
      color: #d1d9e6;
      margin-bottom: 20px;
    }

    /* 动画效果 */
    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .fadeInUp {
      animation: fadeInUp 0.6s ease forwards;
    }
    </style>
</head>
<body>
<div class="container page-container">
    <!-- 当前周期信息 -->
    <div class="card period-card fadeInUp" style="animation-delay: 0.1s">
        <div class="card-body">
            <div th:if="${currentPeriod != null}">
                <div class="d-flex align-items-center mb-4">
                    <div class="icon-circle icon-circle-primary">
                        <i class="bi bi-calendar-check" style="font-size: 22px;"></i>
                    </div>
                    <h5 class="card-title mb-0 fw-bold" th:text="${currentPeriod.name}">当前评测周期名称</h5>
                </div>
                <div class="d-flex flex-column ps-2">
                    <div class="text-muted small mb-3 d-flex align-items-center">
                        <i class="bi bi-clock me-2"></i>
                        <span>开始时间: </span>
                        <span class="ms-2 text-dark fw-medium"
                              th:text="${currentPeriod != null ? currentPeriod.startTimeStr : '未设置'}">2023-01-01</span>
                    </div>
                    <div class="text-muted small d-flex align-items-center">
                        <i class="bi bi-flag me-2"></i>
                        <span>结束时间: </span>
                        <span class="ms-2 text-dark fw-medium"
                              th:text="${currentPeriod != null ? currentPeriod.endTimeStr : '未设置'}">2023-01-31</span>
                    </div>
                </div>
            </div>
            <div th:if="${currentPeriod == null}" class="empty-state">
                <i class="bi bi-calendar-x empty-state-icon"></i>
                <p class="text-muted mb-0">当前没有正在进行的评测周期</p>
            </div>
        </div>
    </div>
</div>

<!-- 底部导航栏 -->
<div class="nav-bottom">
    <a href="/h5/index" class="nav-item active">
        <div class="nav-icon">
            <i class="bi bi-house-door-fill"></i>
        </div>
        <div>首页</div>
    </a>
    <a href="/h5/my" class="nav-item">
        <div class="nav-icon">
            <i class="bi bi-person"></i>
        </div>
        <div>我的</div>
    </a>
</div>

<!-- jQuery -->
<script th:src="@{/static/js/jquery-3.6.0.min.js}"></script>
<!-- Bootstrap JS -->
<script th:src="@{/static/js/bootstrap.bundle.min.js}"></script>

<script th:inline="javascript">
    $(document).ready(function() {
      // 页面逻辑
      window.location.href = '/h5/index';
    });
</script>
</body>
</html>
